package com.ciban.smarthome;

import android.test.InstrumentationTestCase;

import com.ciban.smarthome.common.utils.logcrash.LogUtil;
import com.ciban.smarthome.module.db.dao.AreaDao;
import com.ciban.smarthome.module.db.dao.CurtainDao;
import com.ciban.smarthome.module.entity.Area;
import com.ciban.smarthome.module.entity.Equip_Curtain;

import java.util.ArrayList;

/**
 * Created by wdl on 2015/11/10.
 */
public class CurtainTest extends InstrumentationTestCase {
    public void testDao(){
        AreaDao adao=new AreaDao(getInstrumentation().getContext());
        ArrayList<Area> areaList = adao.getAreaList();
        for (Area info:areaList){
            LogUtil.info(info.toString());
        }

        CurtainDao dao=new CurtainDao(getInstrumentation().getContext());
        ArrayList<Equip_Curtain> curtainList = dao.getCurtainList(areaList.get(0).getId(), 1);
        for(Equip_Curtain info:curtainList){
            LogUtil.info(info.toString());
        }

    }
}
